.tab-costs-content {
  margin-top: 40px;

  .templates-select {
    display: flex;
    align-items: center;

    .checklist {
      padding-right: 10px;
    }
  }

  .tab-costs-item {
    border-bottom: 1px solid #323860;
    padding-bottom: 40px;
  }

  .cost-select, .cost-item-description {
    &::-webkit-scrollbar {
      width: 8px;
    }

    &::-webkit-scrollbar-track {
      background: #10163a;
      cursor: pointer;
    }

    &::-webkit-scrollbar-thumb {
      background: #7367f0;
      border-radius: 1px;
    }

    &::-webkit-scrollbar-thumb:hover {
      background: #7367f0;
    }
  }

  .costs-element-left {
    border-right: 0.5px solid rgba(235, 238, 252, 0.31);
  }

  .tab-costs-elements {
    padding-top: 40px;
  }

  .cost-select {
    max-width: 140px;
    min-width: 107px;
  }

  .back-input {
    background: #fff;
    border: 1px solid #ccc;
    padding: 10px 5px;
    border-radius: 5px;
    height: 100%;
    max-width: 140px;
    min-width: 140px;
    max-height: 100%;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
  }

  .fonticon-wrap {
    cursor: pointer;

    &:hover {
      stroke: #7367f0;
      transform: scale(1.3);
    }
  }
}

.popover-cost .arrow:after {
  border-left-color: #6F64F8 !important;
  border-right-color: #6F64F8 !important;
}

.popover-cost .arrow:before {
  border-right-color: #6F64F8 !important;
  border-left-color: #6F64F8 !important;
}

.popover-cost.bs-popover-auto[x-placement^="left"] > .arrow::after {
  right: -15px;
  border-width: 2.5rem 0 2.5rem 2.5rem;
  top: calc(-2.5rem + 7px)
}

.popover-cost.bs-popover-auto[x-placement^="right"] > .arrow::before {
  left: -15px;
  border-width: 2.5rem 2.5rem 2.5rem 0;
  top: calc(-2.5rem + 7px)
}

.popover-cost.bs-popover-auto[x-placement^="right"] {
  left: 20px !important;
}

.popover-cost.bs-popover-auto[x-placement^="left"] {
  left: -20px !important;
}

.popover-cost .popover-header, .popover-cost .popover-body {
  background-color: #6F64F8 !important;
}

.popover-cost {
  min-width: 327px !important;
}

.popover-cost .popover-body {
  min-height: 183px !important;
}

.popover-cost .popover-body {
  display: flex;
}

.cost-popover-content {
  font-family: Montserrat;
  font-style: normal;
  font-weight: 500;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 100%;
  width: 100%;
  font-size: 14px;
  line-height: 20px;
  color: #EBEEFC;
}

.cost-popover-footer {
  padding: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;

  .cost-popover-edit {
    display: flex;
    align-items: center;
  }
}

.cost-popover-edit-text {
  font-style: normal;
  font-weight: normal;
  font-size: 12px;
  line-height: 19px;
  text-decoration-line: underline;
  color: #EBEEFC;

}

.cost-popover-edit-text:hover {
  color: #fff!important;
}

.popover-cost-header {
  display: flex;
  justify-content: space-between;
  padding-top: 15px;
  align-items: center;
  position: relative;
  padding-bottom: 18px;
}

.popover-cost-name {
  width: calc(100% - 25px);
  display: flex;
  justify-content: center;
  font-family: Montserrat;
  font-style: normal;
  font-size: 14px;
  line-height: 19px;
  color: #EBEEFC;
  text-align: center;
}

.popover-cost-close {
  position: absolute;
  right: 0;
  top: 0;
  cursor: pointer;

}

body.dark-layout .fonticon-wrap {
  color: #fff;
}

body.dark-layout .back-input {
  background: #2d345b;
  border-width: 0;
}

.cost-item {
  color: #101738 !important;
}

.cost-item {
  border-radius: 5px;
  font-size: 15px;
  color: #EBEEFC;
  box-sizing: border-box;
  outline: none;
  width: 100%;
  height: 100%;
  border: 1px solid #d9d9d9;
  background-color: #f5f5f1;
}


body.dark-layout .cost-item {
  border: 1px solid #101738;
  background-color: #101738;
  color: #FFFFFF !important;
}

body.dark-layout .template-input {
  background-color: #2D345B;
}

.cost-item-description {
  min-height: 90px;
}

.cost-item:focus {
  border: 1px solid #6F64F8 !important;
  box-shadow: 0 0 5px rgba(111, 100, 248, 0.83);
}

.cost-item-input {
  padding: 10.5px 20px 10.5px 10px;
}

.costs-templates {
  .cost-item-input {
    background: #f5f5f1;
  }

  .add-template {
    max-width: 284px;
    width: 100vw;
  }

  .templates-list {
    background: #262C49;
    border-radius: 5px;
    max-width: 287px;
    width: 100%;
    height: max-content;

    .templates-list-items {
      overflow-y: auto;
      max-height: 252px;
      height: 252px;
      padding: 5px 16px 5px 16px;
      transition: .5s;

      .selected {
        p {
          color: #6F64F8;
        }
      }

      &::-webkit-scrollbar {
        width: 8px;
      }

      &::-webkit-scrollbar-track {
        background: #10163a;
        cursor: pointer;
      }

      &::-webkit-scrollbar-thumb {
        background: #7367f0;
        border-radius: 1px;
      }

      &::-webkit-scrollbar-thumb:hover {
        background: #7367f0;
      }
    }

    .templates-list-items-collapsed {
      padding: 0;
      height: 0;
      transition: .5s;
    }

    .add-template, .select-template {
      background: #262C49;
      padding: 5px 16px 5px 16px;
    }

    p {
      font-style: normal;
      font-weight: 500;
      font-size: 14px;
      line-height: 30px;
      color: #EBEEFC;
      margin: 0;
    }

    .select-template {
      padding-bottom: 7px;
      cursor: pointer;

      p {
        font-style: normal;
        font-weight: 500;
        font-size: 12px;
        line-height: 30px;
        color: rgba(235, 238, 252, 0.27);
      }
    }

    .templates-list__item {
      padding-bottom: 7px;
      padding-top: 9px;
      border-bottom: 0.5px solid rgba(235, 238, 252, 0.6);
      cursor: pointer;

      &:hover p {
        color: #6F64F8;
      }
    }
  }
}

@media (max-width: 1680px) {
  .costs-item .costs-name {
    width: 100% !important;
    padding-right: 0 !important;
  }
  .menu-collapsed .costs-item .costs-name {
    width: auto !important;
    padding-right: 1rem !important;
  }
  .costs-item .costs-select {
    width: 100%;
    max-width: 100%;
    margin-top: 1rem;
  }
  .menu-collapsed .costs-item .costs-select {
    margin-top: 0;
    max-width: 140px;
    min-width: 140px;
  }
}

@media (max-width: 1520px) {
  .menu-collapsed .costs-item .costs-name {
    width: 100% !important;
    padding-right: 0 !important;
  }
  .menu-collapsed .costs-item .costs-select {
    width: 100%;
    max-width: 100%;
    margin-top: 1rem;
  }
}

@media (max-width: 1444px) {
  .costs-templates {
    .costs-template {
      flex-direction: column-reverse;
    }
  }
}

@media (max-width: 1400px) {
  .costs-element-left, .costs-element-right {
    width: 100% !important;
    max-width: 100% !important;
    flex: 0 0 100% !important;
  }
  .costs-item .costs-name {
    width: auto !important;
    padding-right: 1rem !important;
  }
  .costs-item .costs-select {
    margin-top: 0;
    max-width: 140px;
    min-width: 140px;
  }
  .menu-collapsed .costs-element-left, .menu-collapsed .costs-element-right {
    width: auto !important;
    max-width: 50% !important;
    flex: 0 0 50% !important;
  }
  .costs-element-left {
    border-right-width: 0 !important;
  }
  .menu-collapsed .costs-element-left {
    border-right-width: 0.5px !important;
  }
}

@media (max-width: 1380px) {
  .costs-templates {
    .costs-template {
      flex-direction: column-reverse;
    }
  }
  .menu-collapsed .costs-templates {
    .templates-list {
      max-width: 287px;
      width: 100%;
    }

    .costs-template {
      flex-direction: row;
    }
  }

}

@media (max-width: 1200px) {
  .tab-costs-content .costs-element-left {
    border-right-width: 0 !important;
  }
  .costs-templates {
    .templates-list {
      max-width: 287px;
      width: 100%;
    }
  }
}

@media (max-width: 992px) {
  .costs-templates {
    .costs-template {
      flex-direction: row;
    }
  }
}


@media (max-width: 840px) {
  .costs-templates {
    .costs-template {
      flex-direction: column-reverse;
    }
  }

}


@media (max-width: 600px) {
  .costs-item .costs-name {
    width: 100% !important;
    padding-right: 0 !important;
  }
  .costs-item .costs-select {
    margin-top: 1rem;
    width: 100%;
    max-width: 100%;
  }
}


@media (max-width: 400px) {
  .costs-item .costs-name {
    flex-wrap: wrap;
  }
  .costs-item .costs-money {
    width: 100%;
    max-width: 100%;
    margin-top: 1rem;
  }
  .costs-item .costs-select {
    width: 100%;
    max-width: 100%;
  }
}
